<div class="m-tab s-tab">
	<h2 class="u-tt">推荐内容管理</h2>
	<ul class="u-tabs">
		<li><a href="{$url|'AdminPositionRelation/index'}">推荐列表</a></li>
		<li><a href="#tab1" class="tab-on tab-a">{$actionName}推荐</a></li>
		<li><a href="#tab2" class="tab-a">其他设置</a></li>
	</ul>
</div>
<div class="m-form">
	<form name="" action="<?php echo url('AdminPositionRelation/'.$action.'Data'); ?>" method="post" id="form">
		<fieldset>
			<div id="tab1">
				<div class="formitm">
					<label class="lab">推荐位置：</label>
					<div class="ipt">
						<select name="pos_id" class="u-slt" id="pos_id" datatype="*" >
							<option value="">===请选择===</option>
							<!--{loop="$positionList $vo"}--> 
							<option <!--{if="$vo['pos_id']==$info['pos_id']"}-->selected="selected"<!--{/if}--> value="{$vo.pos_id}">{$vo.name}
						
							
							</option>
							<!--{/loop}-->
						</select>
						<p></p>
					</div>
				</div>
				<div class="formitm">
					<label class="lab">内容标题：</label>
					<div class="ipt"> {$contentInfo.title}
						<p></p>
					</div>
				</div>
				<div class="formitm">
					<label class="lab">开始时间：</label>
					<div class="ipt">
					{if="empty($info['stop_time'])"}
					<input name="start_time" type="text" class="u-ipt u-ipt-5  u-time" id="start_time" value="<?php echo date('Y-m-d  H:i:s'); ?>" maxlength="250" datatype="*" />
					{else}
					<input name="start_time" type="text" class="u-ipt u-ipt-5  u-time" id="start_time" value="{$info.start_time|format_time:'Y-m-d H:i:s'}" maxlength="250" datatype="*" />
					{/if}
						<p></p>
					</div>
				</div>
				<div class="formitm">
					<label class="lab">结束时间：</label>
					<div class="ipt">
					{if="empty($info['stop_time'])"}
					<input name="stop_time" type="text" class="u-ipt u-ipt-5  u-time" id="stop_time" value="<?php echo date('Y-m-d  H:i:s',time()+31557600*2); ?>" maxlength="250" datatype="*"  />
					{else}
					<input name="stop_time" type="text" class="u-ipt u-ipt-5  u-time" id="stop_time" value="{$info.stop_time|format_time:'Y-m-d H:i:s'}" maxlength="250" datatype="*"  />
					{/if}
						<p></p>
					</div>
				</div>
				
				<div class="formitm">
					<label class="lab">排序：</label>
					<div class="ipt">
						<input name="sequence" type="text" class="u-ipt u-ipt-5" id="sequence" value="{$info.sequence|is_empty:'0'}" maxlength="250" datatype="n" />
						<p>数字越小位置越前</p>
					</div>
				</div>
                <div class="formitm">
              <label class="lab" >推荐状态：</label>
              <div class="ipt">
                <label class="u-opt">
                  <input name="status" type="radio" value="1" {if="$info['status']==1"} checked="checked" {/if} />
                  正常</label>
                <label class="u-opt">
                  <input name="status" type="radio" value="0" {if="$info['status']==0"} checked="checked" {/if} />
                  停止</label>
              </div>
        </div>
			</div>
			<div id="tab2" class="m-tabpanel">
				<div class="formitm">
					<label class="lab">自定义标题：</label>
					<div class="ipt">
						<input name="title" type="text" class="u-ipt u-ipt-5" id="title" value="{$info.title}" maxlength="250" />
						<p>可选，填写将会优先显示此标题</p>
					</div>
				</div>
				<div class="formitm">
					<label class="lab">自定义描述：</label>
					<div class="ipt">
						<input name="content" type="text" class="u-ipt u-ipt-5" id="content" value="{$info.content}" maxlength="250" />
						<p>可选，可作为扩展信息调用</p>
					</div>
				</div>
				<div class="formitm">
					<label class="lab">自定义封面图：</label>
					<div class="ipt">
						<input type="text" name="image"  class="u-ipt u-ipt-4" id="image" value="{$info.image}"  />
						<span class="suffix">
						<button class="u-btn u-img-upload" type="button" data="image" preview="image_preview" id="image_button">上传</button>
						<button class="u-btn" type="button" id="image_preview">预览</button>
						</span>
						<p>可选，填写将会优先显示此封面图</p>
					</div>
				</div>
			</div>
			<div class="formitm formitm-1  formitm-2">
				<input name="data_id" type="hidden" value="{$info.data_id}" />
				<button class="u-btn" type="submit">保存</button>
				<button class="u-btn s-btn-c3" type="reset">重置</button>
				<span class="status" id="status"></span> </div>
		</fieldset>
	</form>
</div>
<script>
Do.ready('base','form','dialog','editor','upload','calendar','tabs',function() {
	//表单综合处理
	$('#form').duxFormPage({
			returnUrl:'{$url|"AdminPositionRelation/index"}'
		});
});
</script>